package com.git.contractmanagement.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.git.contractmanagement.entity.PayOrder;
import com.git.contractmanagement.mapper.PayOrderMapper;
import com.git.contractmanagement.service.OrderService;
import com.git.contractmanagement.service.PayOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 34981
 * @description 针对表【pay_order】的数据库操作Service实现
 * @createDate 2025-09-11 21:44:27
 */
@Service
public class PayOrderServiceImpl extends ServiceImpl<PayOrderMapper, PayOrder>
        implements PayOrderService {

    @Autowired
    private OrderService orderService;
    @Autowired
    private PayOrderMapper payOrderMapper;

    @Override
    public String paySuccess(String tradeNo) {
        PayOrder payOrder = payOrderMapper.selectBytradeNo(tradeNo);
        orderService.paySuccess(payOrder.getOrderId());

        return "success";
    }

}




